import request from '@/config/axios'

export const getByCustomerId = async () => {
  return await request.get({
    url: '/customer/getByCustomerId'
  })
}

export const getInfoById = async (params) => {
  return await request.get({
    url: '/customer/getById',
    params
  })
}

export const getByIdToUpdate = async (params) => {
  return await request.get({
    url: '/customer/getByIdToUpdate',
    params
  })
}

export const updateCustomer = async (data) => {
  return await request.put({
    url: '/customer/update',
    data
  })
}

export const validUserAccount = async (params) => {
  return await request.get({
    url: '/customer/validUserAccount',
    params
  })
}

export const validSocialCreditCode = async (params) => {
  return await request.get({
    url: '/customer/validSocialCreditCode',
    params
  })
}

export const validCustomerName = async (params) => {
  return await request.get({
    url: '/customer/validCustomerName',
    params
  })
}

export const updateState = async (data) => {
  return await request.put({
    url: '/customer/updateState',
    data
  })
}

export const updateBiddingState = async (data) => {
  return await request.put({
    url: '/customer/updateBiddingState',
    data
  })
}
